<div id="edit-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      
    </div>
    <!-- /.modal-content -->
  </div>
</div>

<script type="text/html" id="edit-form-template">
     <form id="edit-form-data" action="editJson.json" method="post" onsubmit="return false;" class="form-horizontal">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	        <h4 class="modal-title" id="editModalLabel">员工信息修改</h4>
	      </div>
	      <!-- /.modal-header -->
	      <div class="modal-body">
	        <div class="row">
	           <div class="col-md-12">
	           
	              <div class="form-group">
	                 <label class="col-md-2 control-label">员工</label>
	                 <div class="col-md-4">
	                     <select name="staffCode" required data-msg-required="请选择员工">
	                        <option value="">无</option>
	                        <%for(staff in staffList!){%>
	                        <option value="${staff.code}"{{d.staffCode == '${staff.code}' ? ' selected':''}}>${staff.name}</option>
	                        <%}%>
	                     </select>
	                 </div>
	              </div>
	              
	              <div class="form-group">
	                 <label class="col-md-2 control-label">用户名</label>
	                 <div class="col-md-4">
                        <input type="hidden" name="id" value="{{d.id}}">
	                    <input type="text" name="username" class="form-control" placeholder="请输入用户名" value="{{d.username}}" required>
	                 </div>
	              </div>
	              
	              <div class="form-group">
	                 <label class="col-md-2 control-label">角色</label>
	                 <div class="col-md-4">
	                    <%for(role in roles!){%>
	                    <label><input type="checkbox" name="role" value="${role.code}"> ${role.name}</label>
	                    <%}%>
	                 </div>
	              </div>
	              
	              <div class="form-group">
	                 <label class="col-md-2 control-label">账号有效性</label>
	                 <div class="col-md-4">
	                    <label><input type="radio" name="avaiable" value="0"> 无效</label>
	                    <label><input type="radio" name="avaiable" value="1" checked> 有效效</label>
	                 </div>
	              </div>
	              
	              <input type="hidden" name="addtime" value="{{d.addtime || ''}}">
	           </div>
	        </div>
	      </div>
	      <!-- /.modal-body -->
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	        <button type="submit" class="btn btn-primary submit-button">提交</button>
	      </div>
      </form>
</script>